import * as step from '@flow-step/step-toolkit'
import process from 'process'
import {installHelm} from "./install";

async function runStep(): Promise<void> {
    const helmVersion: string | undefined =
        process.env['helmVersion']

    if (helmVersion == undefined) {
        throw new Error('helmVersion is not specified')
    }

    await installHelm(helmVersion)
}

runStep()
    .then(function () {
        step.success('run step successfully!')
    })
    .catch(function (err: Error) {
        step.error(err.message)
        process.exit(-1)
    })
